Skip to content

chore: update code generation and styleguide instructions concerning use of auto keyword - #16346

Open
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:chore_agents_style_auto_vars
Open

chore: update code generation and styleguide instructions concerning use of auto keyword#16346
scotthart wants to merge 2 commits into
googleapis:mainfrom
scotthart:chore_agents_style_auto_vars

Conversation

@scotthart

Copy link
Copy Markdown
Member

While we were writing all the code by hand, we have been lax in following the Google Style Guide directives for the use of auto. This made writing code a little easier at the cost of readability.Now that more code is being generated, it's less onerous to use more explicit types and even more important to maximize human readability of code.

@scotthart
scotthart requested a review from a team as a code owner August 12, 2026 14:23

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new section to .agents/AGENTS.md outlining guidelines for type deduction and the use of auto in C++ based on Abseil Tip #232. The reviewer suggested clarifying that bare auto deduces by value to prevent accidental copies when a reference or pointer is intended.

Comment thread .agents/AGENTS.md Outdated
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.23%. Comparing base (443e254) to head (8b89a7b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16346   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files        2227     2227           
  Lines      209357   209357           
=======================================
+ Hits       193101   193107    +6     
+ Misses      16256    16250    -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant